package com.mall;
import org.springframework.context.annotation.Bean;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
//@Configuration
public class WebSocketConfig2 {
   /**
    * 给spring容器注入这个ServerEndpointExporter对象
    * <p>
    * 检测所有带有@serverEndpoint注解的bean并注册他们。
    */
   @Bean
   public ServerEndpointExporter serverEndpointExporter() {
      System.out.println("我被注入了");
      return new ServerEndpointExporter();
   }
}